package org.tgit.gateway.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.tgit.gateway.domain.APIServerInfo;
import org.tgit.gateway.domain.ApiInfo;
import org.tgit.gateway.domain.ApiMonitorInfo;
import org.tgit.gateway.domain.AuthAppApiInfo;
import org.tgit.gateway.domain.ServiceAuthorize;
import org.tgit.gateway.domain.TaskPojo;

import com.github.pagehelper.Page;

@Repository(value="gatewayMapper")
public interface GatewayMapper {
  public List<Map<String,Object>> getApiServerList();
  //根据传入的APPId和APIID查询对应的Token和AccessUri
  public Page<AuthAppApiInfo> getAuthInfos(@Param("params")ServiceAuthorize[] apiAuth);
  public Page<APIServerInfo> queryPageApiService();
  public List<APIServerInfo> queryApiService(@Param("params")Map<String, Object> param);
  public List<TaskPojo> queryAllTasks();
  public void batchInsertApiMonitorDetails(@Param("params")List<ApiMonitorInfo> monitorInfos);
  public List<ApiInfo> getApiBeanByAccessUri(@Param("accessUri") String accessUri);
}
